﻿/**
 * id: 私信ID
 * text: 私信内容
 * sender_id：发送人UID
 * recipient_id: 接受人UID
 * created_at: 发送时间
 * sender_screen_name: 发送人昵称
 * recipient_screen_name：接受人昵称
 * sender: 发送人信息，参考user说明
 * recipient: 接受人信息，参考user说明
 * 
 * @classDescription 微博私信各字段定义；
 * @author Jeff Kwok
 * @since 2010-07-21
 */

var WEIBO = window.WEIBO || {};

(function () {
	 WEIBO.DirectMessage = function(directMessage){
		 if (directMessage==""){ return null; }
	 };
	 
	 WEIBO.DirectMessage.prototype.id = new String();
	 WEIBO.DirectMessage.prototype.text = new String();
	 WEIBO.DirectMessage.prototype.sender_id = new String();
	 WEIBO.DirectMessage.prototype.recipient_id = new String();
	 WEIBO.DirectMessage.prototype.created_at = new String();
	 WEIBO.DirectMessage.prototype.sender_screen_name = new String();
	 WEIBO.DirectMessage.prototype.recipient_screen_name = new String();
	 WEIBO.DirectMessage.prototype.sender = null;
	 WEIBO.DirectMessage.prototype.recipient = null;
	 
	 WEIBO.DirectMessage.prototype.init = function (directMessage){
		 this.id = directMessage.id;
		 this.text = directMessage.text;
		 this.sender_id = directMessage.sender_id;
		 this.recipient_id = directMessage.recipient_id;
		 this.created_at = directMessage.created_at;
		 this.sender_screen_name = directMessage.sender_screen_name;
		 this.recipient_screen_name = directMessage.recipient_screen_name;
		 this.sender = new WEIBO.User(directMessage.sender);
		 this.recipient = new WEIBO.User(directMessage.recipient);
	 
	 }
	 
}());